@import "src/css/designerStyles/index.scss";
$light-border: 1px solid #d9d9d9;
$primaryColor: #c2c8d5;

.xflow-algo-node {
  z-index: 10;
  display: flex;
  align-items: center;
  width: 220px;
  height: 38px;
  text-align: center;
  background-color: #fff;
  border: 1px solid #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
  transition: all .15s ease-in-out;
  &:hover {
    background-color: #fff;
    border: 1px solid $--color-blue;
    box-shadow: 0 0 3px 3px rgba(48, 86, 227, 0.15);
    cursor: move;
    .icon{
      border-top-color: $--color-blue !important;
      border-bottom-color: $--color-blue !important;
      border-left-color: $--color-blue !important;
    }
  }
  .icon {
    width: 36px;
    margin: 0 0 0 -1px;
    border-radius: 3px 0 0 3px;
    height: calc(100% + 2px);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ffffff00;
    .svg-icon{
      width: 1.2em;
      height: 1.2em;
      vertical-align: -0.3em;
      fill: white;
    }
  }
  &.node-desc{
    height: 50px;
    .center-container{
      .label{
        margin-top: 4px;
      }
    }
  }
  .center-container{
    width: 146px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    .label,.desc {
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding-left: 8px;
      text-align: left;
      display: inline-block;
    }
    .desc{
      color: #7f8289;
      font-size: 12px;
      margin-top: 6px;
    }
  }
  .status {
    width: 36px;
    font-size: 16px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  &.panel-node {
    border: 0;
  }
  .isOldNode{
    position: absolute;
    top: 2px;
    right: 4px;
    &:after {
      content: "*";
      color: #52c41a;
    }
  }
}

.x6-node-selected {
  .xflow-algo-node {
    background-color: #fff;
    border: 1px solid $--color-blue;
    box-shadow: 0 0 3px 3px rgba(48, 86, 227, 0.15);
    .icon{
      border-top-color: $--color-blue !important;
      border-bottom-color: $--color-blue !important;
      border-left-color: $--color-blue !important;
    }
    &:hover {
      box-shadow: 0 0 5px 5px rgba(48, 86, 227, 0.15);
    }
  }
}

.popover-container{
  padding: 8px;
  .list{
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 204px;
    .item{
      font-size: 12px;
      padding: 0;
      line-height: 16px;
      word-break: break-all;
      margin: 0;
      width: 204px;
      display: flex;
      .label{
        flex: 1 0 38px;
        text-align: right;
        padding-right: 4px;
        position: relative;
        word-break: break-all;
        color: rgba(0,0,0,.85);
      }
      .text{
        padding-left: 4px;
        flex: 3 0 100px;
        color: rgba(0,0,0,.45);
        word-break: break-all;
      }
      .error{
        color: #ff4d4f;
      }
      .state-text{
        margin-left: 4px;
      }
    }
    .item+.item{
      margin: 6px 0 0 0;
    }
  }
}

.node-state-icon{
  &.Success{
    color: #52c41a;
  }
  &.Failed{
    color: #ff4d4f;
  }
  &.Running{
    color: $--color-blue;
    animation: spin 1s linear infinite;
  }
  &.Paused{
    color: #E6A23C;
  }
  &.Cancelled{
    color: #606266;
  }
}
